package main

import (
	"fmt"
	"gorm.io/driver/mysql"
	"gorm.io/gorm"
	"log"
)

func main() {
	dsn := "root:Tw2022!@#@tcp(127.0.0.1:3306)/tuowei?charset=utf8mb4&parseTime=True&loc=Local"
	db, _ := gorm.Open(mysql.Open(dsn), &gorm.Config{})
	err := db.Exec("truncate sys_migration").Error
	if err != nil {
		log.Panicln("truncate err: ", err.Error())
	} else {
		fmt.Println("Success")
	}

}
